package com.pucheng.bracelet.ui.activity

import android.content.Intent
import android.os.Bundle
import com.pucheng.bracelet.BuildConfig
import com.pucheng.bracelet.R
import com.pucheng.bracelet.app.base.BaseTitleActivity
import com.pucheng.bracelet.app.util.click
import com.pucheng.bracelet.databinding.ActivityAboutBinding
import com.pucheng.bracelet.ui.activity.upgrade.UpgradeActivity
import kotlinx.android.synthetic.main.activity_about.*
import me.hgj.jetpackmvvm.base.viewmodel.BaseViewModel

class AboutActivity : BaseTitleActivity<BaseViewModel, ActivityAboutBinding>() {
    override fun layoutId(): Int = R.layout.activity_about
    override fun initView(savedInstanceState: Bundle?) {
        tv_app_version.text = BuildConfig.VERSION_NAME
        cd_updata.click { startActivity(Intent(this, UpgradeActivity::class.java)) }
        cd_app_score.click { "还未上架应用市场暂时无法操作" }
    }

    override fun titleText(): String = getString(R.string.about)
}